package com.dnui.seven2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dnui.seven2.entity.Employee;
import com.dnui.seven2.entity.Merch;
import com.dnui.seven2.entity.Shows;
import com.dnui.seven2.service.MerchService;
import com.dnui.seven2.mapper.MerchMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fengy
 * @description 针对表【merch】的数据库操作Service实现
 * @createDate 2022-10-16 09:11:26
 */
@Service
public class MerchServiceImpl extends ServiceImpl<MerchMapper, Merch>
        implements MerchService{

    @Autowired
    private MerchMapper merchMapper;

    @Override
    public List<Merch> selectAll() {
        //构造条件构造器
        LambdaQueryWrapper<Merch> queryWrapper=new LambdaQueryWrapper();
        List<Merch> merches = merchMapper.selectList(null);
        return merches;
    }

    @Override
    public List<Merch> page(int page, int pageSize, String name) {
        return null;
    }



    @Override
    public void delete(Long merchId) {
        merchMapper.deleteById(merchId);
    }

    @Override
    public void update(Merch merch) {
        merchMapper.updateById(merch);
    }
}




